package com.Mt.Serviceimpl;


import com.Mt.Service.MtOrderService;
import com.Mt.mapper.MT_OrderMapper;
import com.Mt.pojo.Mt_Order;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * (MtOrder)表服务实现类
 *
 * @author 赵春磊
 * @since 2020-12-28 08:45:07
 */
@Service
public class MtOrderServiceImpl implements MtOrderService {
    @Autowired
    private MT_OrderMapper mtOrderMapper;


    @Override
    public List<Mt_Order> selById() {
        return  mtOrderMapper.orderByUserId();
    }

    @Override
    public int DelOrder(int orderNumber) {
        return mtOrderMapper.DelOrder(orderNumber);
    }

    @Override
    public int AddOrder(Mt_Order mt_Order) {
        return   mtOrderMapper.AddOrder(mt_Order);
    }

    /**
     * 查询对应用户的订单
     *
     * @param userid
     */
    @Override
    public List<Mt_Order> selByID(String userid) {
        return mtOrderMapper.selByID(userid);
    }


}